<script setup >
import SubmissionItem from './TeamworkSubmissionItem.vue';

// Modal
const props = defineProps(['isOpenModal'])
const emit = defineEmits(['closeModal'])

function closeModal() {
    emit('closeModal')
}
</script>
<template>
    <div class="overview-modal" :class="{ open: props.isOpenModal }">
        <div class="content">

            <div class="header">
                <img src="/src/assets/images/student/close.svg" alt="Delete" @click="closeModal" />
            </div>
            <div class="main">
                <p>所有文本</p>
                <div class="submission-area-container">
                    <SubmissionItem class="submission-item" />
                    <SubmissionItem class="submission-item" />

                </div>
                <p>所有附件</p>
                <div class="appendix-file">
                <ul>
                    <li v-for="item in 15"><a href="/src/assets/images/student/file.svg" download>file.svg</a></li>

                </ul>
            </div>
            </div>
        </div>

    </div>
</template>
<style scoped >
.overview-modal {
    display: none;
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
    z-index: 15;
}

.overview-modal.open {
    display: flex;
    justify-content: center;
    align-items: start;
}

.overview-modal>.content {
    width: 800px;
    background-color: #ffffff;
    border: none;
    box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.16);
    padding: 20px 50px;
    margin-top: 35px;
}

.overview-modal>.content>.header {
    display: flex;
    justify-content: end;
    align-items: center;
    margin-bottom: 30px;
}

.content>.header>img {
    cursor: pointer;
    user-select: none;
    transition: transform 0.3s;
}

.content>.header>img:hover {
    transform: rotate(90deg);
}

.content>.main>p {
    font-family: Source Han Sans CN;
    color: #707070;
    font-size: 20px;
    font-weight: bold;
    line-height: 30px;
    margin-bottom: 20px;
}

.main>.submission-area-container {
    background-color: #ecedf0;
    box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.16);
    padding: 6px 15px;
    margin-bottom: 20px;
}

.main>.submission-area-container>.submission-item {
    margin: 10px 20px;
    padding-bottom: 10px;
}

.main>.submission-area-container>.submission-item:not(:last-of-type) {
    border-bottom: #707070 solid 1px;
}

.appendix-file {
    height: 200px;
    border: 1px solid #707070;
    padding: 12px;
    overflow: auto;
    margin-bottom: 25px;
}

.appendix-file>ul>li {
    list-style: none;
    height: 32px;
}


.appendix-file>ul>li::before {
    content: url("/src/assets/images/student/file.svg");
    vertical-align: middle;
}
</style>